import rxAjax from '@/assets/js/ajax.js';

//表单业务方案 api接口
export const FormBusinessSolutionApi = {};
FormBusinessSolutionApi.baseUrl= '/api-form/form/core/formBusinessSolution';

/**
 * 获取单记录
 * @param alias
 * @returns {*}
 */
FormBusinessSolutionApi.getByAliasAndMainPk =function(alias,mainPk) {
    let url= FormBusinessSolutionApi.baseUrl + '/getByAliasAndMainPk?alias=' + alias+"&mainPk="+mainPk;
    return rxAjax.get(url);
}

/**
 * 保存业务表单数据。
 * [{setting: {action: action, alias: self.formSolutionAlias}, data: data}]
 */
FormBusinessSolutionApi.saveBusForm = function (parameter) {
    var url = '/api-form/form/core/formBusinessSolution/saveBusForm';
    return rxAjax.postJson(url, parameter);
}

export  default FormBusinessSolutionApi;

